<?php
// +----------------------------------------------------------------------
// | Wechat Developmet SDK
// +----------------------------------------------------------------------
// | 版权所有 2017~2020 凤凰县铭锋计算机科技有限公司
// +----------------------------------------------------------------------
// | 官方网站: https://www.emingfeng.com
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// +----------------------------------------------------------------------
// | gitee ：https://gitee.com/emingfeng/wechat-development-sdk
// | github：https://github.com/eMingFeng/wechat-development-sdk
// +----------------------------------------------------------------------

namespace eMingFeng\PaymentV2\Base;

use eMingFeng\Kernel\Contracts\DataArray;
use eMingFeng\Kernel\Contracts\Tools;
use eMingFeng\Kernel\core\BasePaymentV2;

/**
 * 下载交易账单
 * Class Room
 * @package eMingFeng\PaymentV2\Order
 */

class Client extends BasePaymentV2
{



    /**
     * 获取支付规则二维码
     * @param string $productId 商户定义的商品id或者订单号
     * @return string
     */
    public function qrcParams($productId)
    {
        $data = [
            'appid'      => $this->config->get('appid'),
            'mch_id'     => $this->config->get('mch_id'),
            'time_stamp' => (string)time(),
            'nonce_str'  => Tools::createNoncestr(),
            'product_id' => (string)$productId,
        ];
        $data['sign'] = $this->getPaySign($data, 'MD5');
        return "weixin://wxpay/bizpayurl?" . http_build_query($data);
    }

    public function shortUrl($longUrl)
    {
        return parent::shortUrl($longUrl);
    }



    public function getNotify()
    {
        return parent::getNotify(); // TODO: Change the autogenerated stub
    }
}